package com.kgc.scd.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Created On : 2022/11/14 0014.
 * <p>
 * Author : shiguangchuan
 * <p>
 * Description: 历史足迹实体类
 */
@Data
@ApiModel(value = "历史足迹VO",description = "视图层领域模型数据对象，用于前端显示")// 只能加在实体上，模型数据对应实体注解
public class ShopHistoryVO {

    /**
     * 足迹id
     */
    @ApiModelProperty(value = "足迹id")
    @NotBlank(message = "足迹id不能为空")
    private String id;

    /**
     * 商品id
     */
    @ApiModelProperty(value = "商品id")
    @NotBlank(message = "足迹id不能为空")
    private String goodsId;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    @NotBlank(message = "足迹id不能为空")
    private String userId;

    /**
     * 足迹记录时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(value = "足迹时间")
    @NotBlank(message = "足迹id不能为空")
    private Date historyTime;

}
